
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module mp3scrub.util.musicTypes</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mp3scrub.html"><font color="#ffffff">mp3scrub</font></a>.<a href="mp3scrub.util.html"><font color="#ffffff">util</font></a>.musicTypes</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/lib/python2.6/dist-packages/mp3scrub/util/musicTypes.py">/usr/local/lib/python2.6/dist-packages/mp3scrub/util/musicTypes.py</a></font></td></tr></table>
    <p><tt>classes&nbsp;to&nbsp;encapsulate&nbsp;music&nbsp;objects.&nbsp;Used&nbsp;to&nbsp;cache&nbsp;last.fm&nbsp;results,&nbsp;used<br>
in&nbsp;the&nbsp;tagging&nbsp;algorithm,&nbsp;and&nbsp;used&nbsp;to&nbsp;persist&nbsp;tag&nbsp;edits.&nbsp;i.e.&nbsp;everywhere&nbsp;:)<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<a href="#Artist">Artist</a>&nbsp;[name]&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;a&nbsp;list&nbsp;of:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Album">Album</a>&nbsp;[name,&nbsp;mbid,&nbsp;rank,&nbsp;total_tracks]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;has&nbsp;a&nbsp;list&nbsp;of:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Track">Track</a>&nbsp;[&nbsp;name,&nbsp;track_num&nbsp;]&nbsp;&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<br>
&nbsp;<a href="#MP3File">MP3File</a>&nbsp;[path]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Track">Track</a>&nbsp;#respresents&nbsp;the&nbsp;file&nbsp;b4&nbsp;tag&nbsp;cleaning<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Track">Track</a>&nbsp;#respresents&nbsp;the&nbsp;file&nbsp;after&nbsp;tag&nbsp;cleaning</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="mp3scrub.globalz.html">mp3scrub.globalz</a><br>
</td><td width="25%" valign=top><a href="mp3scrub.util.mylog.html">mp3scrub.util.mylog</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="mp3scrub.util.musicTypes.html#Album">Album</a>
</font></dt><dt><font face="helvetica, arial"><a href="mp3scrub.util.musicTypes.html#Artist">Artist</a>
</font></dt><dt><font face="helvetica, arial"><a href="mp3scrub.util.musicTypes.html#MP3File">MP3File</a>
</font></dt><dt><font face="helvetica, arial"><a href="mp3scrub.util.musicTypes.html#Track">Track</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Album">class <strong>Album</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>album&nbsp;metadata.&nbsp;has&nbsp;a&nbsp;list&nbsp;of&nbsp;Tracks.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Album-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>

<dl><dt><a name="Album-__init__"><strong>__init__</strong></a>(self, _artist<font color="#909090">=None</font>, _name<font color="#909090">=None</font>, _mbid<font color="#909090">=None</font>, _rank<font color="#909090">=0</font>, _total_tracks<font color="#909090">=0</font>)</dt></dl>

<dl><dt><a name="Album-__unicode__"><strong>__unicode__</strong></a>(self)</dt></dl>

<dl><dt><a name="Album-addTrack"><strong>addTrack</strong></a>(self, track_obj)</dt></dl>

<dl><dt><a name="Album-copy"><strong>copy</strong></a>(self)</dt></dl>

<dl><dt><a name="Album-getRank"><strong>getRank</strong></a>(self)</dt></dl>

<dl><dt><a name="Album-getTotalTracks"><strong>getTotalTracks</strong></a>(self)</dt></dl>

<dl><dt><a name="Album-setRank"><strong>setRank</strong></a>(self, arg)</dt></dl>

<dl><dt><a name="Album-setTotalTracks"><strong>setTotalTracks</strong></a>(self, arg)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>rank</strong></dt>
</dl>
<dl><dt><strong>total_tracks</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Artist">class <strong>Artist</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Artist">Artist</a>&nbsp;metadata.&nbsp;has&nbsp;a&nbsp;list&nbsp;of&nbsp;albums.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Artist-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>

<dl><dt><a name="Artist-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="Artist-__unicode__"><strong>__unicode__</strong></a>(self)</dt></dl>

<dl><dt><a name="Artist-addAlbum"><strong>addAlbum</strong></a>(self, album_obj)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="MP3File">class <strong>MP3File</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#MP3File">MP3File</a>&nbsp;is&nbsp;used&nbsp;in&nbsp;tracking&nbsp;the&nbsp;tag&nbsp;changes&nbsp;to&nbsp;an&nbsp;mp3&nbsp;file,&nbsp;before&nbsp;and&nbsp;after<br>
a&nbsp;tag&nbsp;has&nbsp;been&nbsp;changed.&nbsp;It&nbsp;has&nbsp;2&nbsp;<a href="#Track">Track</a>&nbsp;objects:&nbsp;track&nbsp;before&nbsp;changes,&nbsp;and&nbsp;track<br>
after&nbsp;changes.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="MP3File-__init__"><strong>__init__</strong></a>(self, orig_track<font color="#909090">=None</font>, clean_track<font color="#909090">=None</font>, result<font color="#909090">='unknown'</font>, fields_changed<font color="#909090">=0</font>, method<font color="#909090">='unknown'</font>, is_dup_flag<font color="#909090">=False</font>, my_path<font color="#909090">=''</font>)</dt></dl>

<dl><dt><a name="MP3File-__unicode__"><strong>__unicode__</strong></a>(self)</dt></dl>

<dl><dt><a name="MP3File-getFieldList"><strong>getFieldList</strong></a>(self)</dt></dl>

<dl><dt><a name="MP3File-updateResults"><strong>updateResults</strong></a>(self)</dt><dd><tt>internal&nbsp;code&nbsp;used&nbsp;to&nbsp;track&nbsp;what&nbsp;fields&nbsp;have&nbsp;changed&nbsp;pre&nbsp;and&nbsp;post&nbsp;tag&nbsp;changes.<br>
&nbsp;<br>
bitfields:<br>
&nbsp;artist&nbsp;changed:&nbsp;1&nbsp;<br>
&nbsp;album&nbsp;changed:&nbsp;2&nbsp;<br>
&nbsp;title&nbsp;changed:&nbsp;4&nbsp;<br>
&nbsp;track_num&nbsp;changed:&nbsp;8</tt></dd></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="MP3File-getFieldLabels"><strong>getFieldLabels</strong></a>()</dt><dd><tt>used&nbsp;by&nbsp;the&nbsp;grid&nbsp;in&nbsp;the&nbsp;gui&nbsp;for&nbsp;labelling</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>fieldList</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>METHOD</strong> = &lt;class mp3scrub.util.musicTypes.METHOD at 0xb76e78cc&gt;</dl>

<dl><dt><strong>QRY_RESULT</strong> = &lt;class mp3scrub.util.musicTypes.QRY_RESULT at 0xb76e789c&gt;</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Track">class <strong>Track</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Track">Track</a>&nbsp;metadata.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Track-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>

<dl><dt><a name="Track-__init__"><strong>__init__</strong></a>(self, _artist<font color="#909090">=''</font>, _album<font color="#909090">=None</font>, _name<font color="#909090">=''</font>, _track_num<font color="#909090">=''</font>, _path<font color="#909090">=''</font>)</dt></dl>

<dl><dt><a name="Track-__unicode__"><strong>__unicode__</strong></a>(self)</dt></dl>

<dl><dt><a name="Track-addAlbum"><strong>addAlbum</strong></a>(self, album_str)</dt></dl>

<dl><dt><a name="Track-copy"><strong>copy</strong></a>(self)</dt></dl>

<dl><dt><a name="Track-getAlbum"><strong>getAlbum</strong></a>(self)</dt></dl>

<dl><dt><a name="Track-getTrackNum"><strong>getTrackNum</strong></a>(self)</dt></dl>

<dl><dt><a name="Track-setAlbum"><strong>setAlbum</strong></a>(self, album_str)</dt><dd><tt>#&nbsp;you&nbsp;can&nbsp;use&nbsp;self.<strong>album</strong>&nbsp;as&nbsp;a&nbsp;single&nbsp;definite&nbsp;album&nbsp;name,&nbsp;or&nbsp;<br>
#&nbsp;self.<strong>albums</strong>&nbsp;as&nbsp;a&nbsp;list&nbsp;of&nbsp;potential&nbsp;album&nbsp;names</tt></dd></dl>

<dl><dt><a name="Track-setTrackNum"><strong>setTrackNum</strong></a>(self, arg)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>album</strong></dt>
</dl>
<dl><dt><strong>track_num</strong></dt>
</dl>
</td></tr></table></td></tr></table>
</body></html>